home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.jan.archive / 000011_crash!UNCA.EDU!JVANRIPER_Tue, 4 Jan 94 05:47:04 PST.msg < prev    next >
Text File  |  1994-02-17  |  2KB  |  42 lines

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Tue, 4 Jan 94 05:47:04 PST
  3. Received: from uncavx by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0pHBgV-0000D7C; Tue, 4 Jan 94 05:20 PST
  5. Received: from UNCA.EDU by UNCA.EDU (PMDF V4.2-14 #3902) id
  6.  <01H7A0E5IYR48WW9TA@UNCA.EDU>; Tue, 4 Jan 1994 08:19:10 EST
  7. Date: Tue, 04 Jan 1994 08:19:10 -0500 (EST)
  8. Message-id: <01H7A0E5K1C28WW9TA@UNCA.EDU>
  9. Organization: University of North Carolina at Asheville
  10. X-VMS-To: IN%"AmigaE@bkhouse.cts.com"
  11. MIME-version: 1.0
  12. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  13. Content-transfer-encoding: 7BIT
  14. From: "Joseph E. Van_Riper III" <JVANRIPER@UNCA.EDU>
  15. To: AmigaE@bkhouse.cts.com
  16. Subject: Re: How to wait..
  17.  
  18. [Question on how to get single-character input from a console without needing a
  19. return character, followed by:]
  20.  
  21. | You can do it the dirty way, by making a busy-wait loop...
  22.  
  23. [Billions of shards of broken glass fly through the air, rending all offendng
  24. busy-wait programs to bits, while the failed programmers who created the foul
  25. monsters weep bitterly.  An ecstatic public of users cry 'Hosanna' in triumph.]
  26.  
  27. There's no need to busy wait <grin>.  To use WaitForChar(), you need to first
  28. use SetMode() to change the behavior of CON: to RAW:.
  29.  
  30. That is:
  31.  
  32. BOOL SetMode(file_handler, LONG mode)
  33.  
  34. where 'mode' is '1' to go to RAW: mode, '0' to go to CON: mode, and
  35. 'file_handler' is simply the filehandle you Open()ed earlier.
  36.  
  37. This is, of course, assuming you're using WB 2.04.  For previous versions, all
  38. I remember is that you had to do some extremely unpleasant (and funky)
  39. weirdness to the filehandle itself, but I cannot remember specifically what. 
  40. But, who programs for anything less than 2.04 anymore <evil grin>.
  41.  
  42. - Trey